package cn.lcsjsxy.yxz.day.Set;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

//工具类
public class toolcategory {

    public static void main(String[] args) {

        //
        int[] is = {4,1,5,3,2};
        int[] is1 = {1,2,3,4,5};
        int[] is2 = {1,2,6,4,5};

        System.out.println(Arrays.toString(is));
        System.out.println(is);

        List<Integer> integers = Arrays.asList(1,2,3,4,5);

        //排序   默认为升序
        Arrays.sort(is);
        System.out.println(Arrays.toString(is));
        //二分查找法,排序后的数组
        System.out.println(Arrays.binarySearch(is,5));
        //数组比较
        System.out.println(Arrays.equals(is,is1));
        System.out.println(Arrays.equals(is2,is1));
        System.out.println(Arrays.equals(is2,0,5,is1,0,5));

    }

}
